import 'package:example/app/routes/app_pages.dart';
import 'package:flutter/material.dart';
import 'package:example/index.dart';

import 'components/found_item.dart';
import 'logic.dart';

class FoundPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          '发现',
          style: appBarTextStyle,
        ),
        actions: [
          IconButton(
            onPressed: () => Get.toNamed(Routes.SEARCH),
            icon: Icon(Icons.search_outlined),
          ),
        ],
      ),
      body: Container(
        child: ListView(
          children: [
            FoundItem(
              title: '导航',
              subtitle: '快捷导航',
              rightImageUrl: 'assets/images/nav.png',
              onTap: () {},
            ),
            FoundItem(
              title: '知识体系',
              subtitle: '查看/搜索知识体系文章',
              rightImageUrl: 'assets/images/knowledge_system.png',
              onTap: () {},
            ),
            FoundItem(
              title: '仓库速查',
              subtitle: 'Google Maven Repo API',
              rightImageUrl: 'assets/images/google.png',
              onTap: () {},
            ),
            FoundItem(
              title: '公众号',
              subtitle: '查看/搜索公众号文章',
              rightImageUrl: 'assets/images/wechat.png',
              onTap: () {},
            ),
            FoundItem(
              title: '项目',
              subtitle: '快速查看实战项目',
              rightImageUrl: 'assets/images/projects.png',
              onTap: () {},
            ),
          ],
        ),
      ),
    );
  }
}
